<!--
 * @Description  : 信息公告详情
 * @Author       : zhao
 * @Date         : 2022-07-08 10:23:49
 * @LastEditors  : zhao
 * @LastEditTime : 2023-02-02 09:26:56
-->

<template>
    <div class="InfoPublicDetails">
        <div class="InfoPublicDetails_div">
            <!-- <zback :name="'公告详情'" url="'/InfoPublic'" /> -->
            <div class="currentLocation">
                <i class="el-icon-location" style="color: #79bbff; padding-right: 5px"></i>
                <span>当前位置：</span>
                <span @click="open()" class="cursor">公告</span>
                <span v-if="isHide">>>{{ infoData.title }}</span>
            </div>
            <div class="InfoPublicDetails_content">
                <!-- <zback :name="'公告详情'" url="'/InfoPublic'" style="" /> -->
                <!-- <div class="BreadcrumbNav">
                    <span style="color: #000">公告 ></span>
                    <span>公告详情 </span>
                </div> -->
                <div style="min-height: calc(100vh - 3.6rem); text-align: center" v-if="isHide">
                    <div class="title">
                        <h1>{{ infoData.title }}</h1>
                        <p class="source">
                            <!-- <span>来源：河北上</span> -->
                            <!-- <span>阅读次数：687次</span> -->
                            <span style="margin: 0 20px"
                                >发布时间：<span class="time" style="margin: 0">{{ infoData.updateTime }}</span></span
                            >
                        </p>
                    </div>
                    <div class="content" v-html="infoData.content"></div>
                </div>
                <div class="nodata"></div>
            </div>
        </div>
    </div>
</template>

<script>
import zback from "@/components/zBack"
export default {
    name: "",
    data() {
        return {
            infoData: {},
            isHide: false,
        }
    },

    components: { zback },

    computed: {},

    mounted() {
        this.getData()
    },

    methods: {
        async getData() {
            const rowdata = JSON.parse(sessionStorage.getItem("infoPublic"))

            const { data } = await this.$store.dispatch("ArchiveInfo/GetNoticeBS", { id: rowdata.id })
            try {
                this.infoData = data
                this.isHide = true
            } catch {}
        },
        open() {
            this.$router.push("/InfoPublic")
        },
    },
}
</script>
<style lang='scss' scoped>
.InfoPublicDetails {
    padding: var(--main-padding);
    // background: #f2f2f2;
    background: url("../../icons/bg.png") repeat-y;
    .InfoPublicDetails_div {
        background: white;
        padding: 20px 36px 60px 36px;
    }
    .InfoPublicDetails_content {
        min-height: $height_full;

        width: 100%;
        margin: 0 auto;

        .title {
            text-align: center;
            h1 {
                font-family: "Microsoft YaHei" !important;
            }
            span {
                margin: 15px 20px;
                color: #666;
            }
        }

        .content {
            border-top: 1px solid #ccc;
            text-align: left;
            padding-top: 0.555rem;

            margin: 0;
            font-size: 0.37rem;
            line-height: 28px;
            letter-spacing: 0.5px;
            text-align: justify;

            color: rgb(0, 0, 0);
            text-align: justify;

            overflow: hidden;
            word-break: break-all;
        }
    }
}

h1 {
    line-height: 56px;
    font-family: "微软雅黑", "宋体";
    font-size: 38px;
    text-align: center;
    padding: 6px 0 6px 0;
    font-weight: normal;
    margin: 0;
}

.source {
    color: #666666;
    font-size: 14px;
    height: 35px;
    overflow: hidden;
    font-family: "宋体";
    text-align: right;
}

.BreadcrumbNav {
    line-height: 44px;
    height: 44px;
    font-size: 12px;
    font-family: "宋体";
    color: #000;
}

.currentLocation {
    // padding-left: 30px;
    line-height: 52px;
    font-family: "Microsoft YaHei" !important;

    font-size: 22px;
    color: #505050;
    background: #fff;
}

.nodata {
    text-align: center;
    line-height: 250px;
    color: #838383;
    font-size: 30px;
}

.cursor:hover {
    color: rgb(121, 187, 255);
}
</style>